export function time(tag: string): MethodDecorator {
    return function (target, propertyKey, descriptor: TypedPropertyDescriptor<any>) {
        let old = descriptor.value;
        descriptor.value = function (...args: any[]) {
            console.time(tag);
            old.apply(this, args);
            console.timeEnd(tag);
        }
    }
}
